package com.example.douyin;
import android.util.Log;
import androidx.fragment.app.Fragment;
import org.xutils.common.Callback;
import org.xutils.http.RequestParams;
import org.xutils.x;

public class BaseFragment extends Fragment implements Callback.CommonCallback<String>{
    public void connectNetwork(String url){
        RequestParams params=new RequestParams(url);
        x.http().get(params,this);
    }

    @Override
    public void onSuccess(String result) {

    }

    @Override
    public void onError(Throwable ex, boolean isOnCallback) {
        Log.i("example","onError:ex=="+ex.getMessage());

    }

    @Override
    public void onCancelled(CancelledException cex) {

    }

    @Override
    public void onFinished() {

    }
}